package com.jcj.jcjconfig.demo;

import com.jcj.jcjconfig.client.annotation.EnableJcjConfig;
import com.jcj.jcjconfig.demo.config.JcjDemoConfig;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.cloud.context.properties.ConfigurationPropertiesRebinder;
import org.springframework.context.ConfigurableApplicationContext;

@SpringBootApplication
@EnableConfigurationProperties({JcjDemoConfig.class})
@EnableJcjConfig
public class JcjConfigDemoApplication {

    public static void main(String[] args) {
        ConfigurableApplicationContext applicationContext = SpringApplication.run(JcjConfigDemoApplication.class, args);
        System.out.println(" &&&& ====> " + applicationContext.getBean(ConfigurationPropertiesRebinder.class));
    }

}
